<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="js/layui/layui/css/layui.css" />
	</head>
	<body>
		<form class="layui-form layui-form-pane" >
		<fieldset class="layui-elem-field">
			<legend>信息维护</legend>
			<div class="layui-field-box">
				<div class="layui-form-item">
					<label class="layui-form-label">姓名</label>
					<div class="layui-input-inline">
						<input type="text" name="name2" placeholder="请输入查询的姓名" autocomplete="off" class="layui-input">
					</div>
					
				</div>
				<div class="layui-form-item">
				<label class="layui-form-label" pane>地址</label>
				<div class="layui-input-inline">
				  <select name="addr2" lay-verify="required" id="soudizhi">
				    <option value=""></option>
				    <option value="北京">北京</option>
				    <option value="青岛">青岛</option>
				    <option value="武汉">武汉</option>
				    <option value="哈尔滨">哈尔滨</option>
				    <option value="潍坊">潍坊</option>
				  </select>
				</div>
				  <input type="button" onclick="sel()" value="搜索" class="layui-btn" />
				  <button type="button" class="layui-btn">添加</button>
				</div>
				
				<table class="layui-table" style="width: 99%;">
					<thead>
		
						<th style="width: 10%;">序号</th>
						<th style="width: 10%;">姓名</th>
						<th style="width: 10%;">生日</th>
						<th style="width: 10%;">性别</th>
						<th style="width: 10%;">爱好</th>
						<th style="width: 10%;">地址</th>
						<th style="width: 10%;">操作</th>
						
					</thead>
					<tbody id="tbody">
		
					</tbody>
				</table>
		
			</div>
		</fieldset>
		</form>
		
		<!-- 添加页面的html -->
		<script type="text/html" id="addd">
		
		<fieldset class="layui-elem-field">
		  <legend>信息维护</legend>
		  <div class="layui-field-box">
		    
			<form class="layui-form" lay-filter="add">
				<div class="layui-form-item">
					<label class="layui-form-label">姓名</label>
					<div class="layui-input-inline">
						<input type="text" name="name" required lay-verify="required" placeholder="请输入姓名" autocomplete="off"
							class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">生日</label>
					<div class="layui-input-inline">
						<input type="text" id="birth" name="birth" required lay-verify="required" placeholder="请输入生日" autocomplete="off"
							class="layui-input">
					</div>
				</div>
				
				<div class="layui-form-item">
				   <label class="layui-form-label">性別</label>
				   <div class="layui-input-block">
				     <input type="radio" name="sex" value="男" title="男">
				     <input type="radio" name="sex" value="女" title="女" checked>
				   </div>
				 </div>
				 
				  <div class="layui-form-item">
				     <label class="layui-form-label">愛好</label>
				     <div class="layui-input-block">
				       <input type="checkbox" name="hobby1" value="跑步" id="paobu" title="跑步" >
				       <input type="checkbox" name="hobby2" value="游泳" id="youyong" title="游泳"  checked>
				       <input type="checkbox" name="hobby3" value="羽毛球" id="yumaoqiu" title="羽毛球" ">
				     </div>
				   </div>
				
				<div class="layui-form-item" >
				    <label class="layui-form-label">地址</label>
				    <div class="layui-input-inline">
				      <select name="addr" lay-verify="required" id="dizhi">
				        <option value="">请选择地址</option>
				        <option value="北京">北京</option>
				        <option value="青岛">青岛</option>
				        <option value="武汉">武汉</option>
				        <option value="哈尔滨">哈尔滨</option>
				        <option value="潍坊">潍坊</option>
				      </select>
				    </div>
			
				<div class="layui-form-item">
					<div class="layui-input-block">
						<input type="button" lay-submit lay-filter="add" value="确定" class="layui-btn" />
						<input type="hidden" name="id" value=''/>
						<input type="reset" class="layui-btn layui-btn-primary" />
						<input type="button" value="关闭" class="layui-btn" />
					</div>
				</div>
			</form>
		  </div>
		</fieldset>
		</script>
		
		<script type="text/html" id="tradd">
		<tr id='tr{{d.id}}'>
			<td id='tda{{d.id}}'>{{d.id}}</td>
			<td id='tdb{{d.id}}'>{{d.name}}</td>
			<td id='tdc{{d.id}}'>{{d.birth}}</td>
			<td id='tdd{{d.id}}'>{{d.sex}}</td>
			<td id='tde{{d.id}}'>{{d.hobby_val}}</td>
			<td id='tdf{{d.id}}'>{{d.addr}}</td>
			<td id='tdg{{d.id}}'>
			<a href="javascript:testDelete({{d.id}});"
			 class="layui-btn layui-btn-danger">
			 <i class="layui-icon layui-icon-delete"></i></a> &nbsp;
			 <a href="javascript:testUpdate({{d.id}});"
			  class="layui-btn layui-btn-normal">修改</a> 
			</td>
		</tr>
		
		</script>
	<script  src="js/layui/layui/layui.js"></script>
	<script type="text/javascript" src="js/tanchuceng2.js" ></script>
	
	</body>
	
</html>
